From 157ee2ffd9f46df156df977db952dee3a5d951b4 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 16 Feb 2008 18:15:50 +0000 Subject: [PATCH] (vc-find-root): Don't loop forever on non-existent root. --- lisp/vc-hooks.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 64a7d8f527a..38ad7b5ea83 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el @@ -316,7 +316,7 @@ The function walks up the directory tree from FILE looking for WITNESS. If WITNESS if not found, return nil, otherwise return the root." ;; Represent /home/luser/foo as ~/foo so that we don't try to look for ;; witnesses in /home or in /. - (while (not (file-directory-p file)) + (while (and (not (file-directory-p file)) (file-exists-p file)) (setq file (file-name-directory (directory-file-name file)))) (setq file (abbreviate-file-name file)) (let ((root nil) -- 2.30.2